import { SETTING } from '../types'
const state = {
	lang: 'zhCN',
}

const getters = {
	lang(state) {
		return state.lang
	},
}

const mutations = {
	[SETTING.SET_LANG](state, lang) {
		state.lang = lang
	},
}

const actions = {
	setLang({ commit }, lang) {
		commit(SETTING.SET_LANG, lang)
	},
}

export default {
	namespaced: true,
	state,
	getters,
	mutations,
	actions,
}
